{% if not projects %}
<span style="color:red">You don't have any projects to clock in to.</span>  Create some <a href="/admin/projects">here</a>.
{% endif %}
<TABLE CELLPADDING="0" CELLSPACING="0">
    <TBODY>
    {% for sum in todays_sums %} {% ifequal sum.project project_name %}
    <TR class="highlight_row">
        {% else %}
    <TR>
        {% endifequal %}
        <TD>{{ sum.project }}</TD>
        <TD>&nbsp;&nbsp;</TD>
        <TD>{{ sum.sum }} hours</TD>
    </TR>
    {% endfor %}
    </TBODY>
</TABLE>
<BR/>
<FORM NAME="punch_form" ID="punch_form" METHOD="post" ACTION="">
    <SELECT NAME="project_key">
        {% for project in projects %}
        <OPTION value="{{ project.key }}">{{ project.name }}</OPTION>
        {% endfor %}
    </SELECT>
    {% if clocked_in %}
    <INPUT TYPE="submit" NAME="submit" VALUE="Clock Out"/>
    {% else %}
    <INPUT TYPE="submit" NAME="submit" VALUE="Clock In"/>
    {% endif %}
    <INPUT TYPE="hidden" NAME="key" VALUE="{{ clocked_in }}"/>
</FORM>
<BR/>
<TABLE CELLPADDING="0" CELLSPACING="0">
    <TBODY>
    {% for punch in todays_punches %}
    <TR>
        <TD>{{ punch.project_name }}</TD>
        <TD>&nbsp;&nbsp;</TD>
        <TD>{{ punch.in_datetime }}</TD>
        <TD>&nbsp;&nbsp;</TD>
        <TD>{{ punch.out_datetime }}</TD>
        <TD>&nbsp;&nbsp;</TD>
        <TD><A HREF="/edit?key={{ punch.key }}">edit</A></TD>
    </TR>
    {% endfor %}
    <TR>
        <TD>&nbsp;</TD>
    </TR>
    <TR>
        <TD colspan="7">Grand Total for today: {{ grand_sum }} hours</TD>
    </TR>
    <TR>
        <TD colspan="7">Grand Total for workweek: {{ workweek_sum }} hours</TD>
    </TR>
    </TBODY>
</TABLE>
